<template>
  <div class="payment-wrap">
    <div class="payment-wrap-item">
      <!-- 余额付款-->
      <div v-if="isYuePay&&Number(this.partYue.balance)>0">
        <van-checkbox v-model="partYue.checkPayment" @change="onYueCbChange" label-position="right" name="yuePay" class="part-yue btm-divide" checked-color="#F20B22">
          <div class="payment-wrap-item-info pay-yue">
            <span class="text">使用余额（余额：<span class="balance_money">{{partYue.balance}}</span>）</span>
          </div>
        </van-checkbox>
        <h2 class="pay-else-title">其他支付方式</h2>
      </div>

      <van-radio-group v-if="isShowElsePay" checked-color="#F20B22"
                       v-model="checkPayment">
        <!-- todo: 定制云闪付 start-->
        <van-radio v-if="showCloudPay && isPM && isPointBuy && !isPeerPay"
                   label-position="left"
                   name="cloudPay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/UnionPay.png"
                   alt="">
            </span>
            <span class="text">云闪付</span>
          </div>
        </van-radio>
        <!-- 定制云闪付 end-->

        <!-- todo: 国际支付宝 start-->
        <van-radio v-if="showGlobalAlipay && isPM "
                   label-position="left"
                   name="globalAlipay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/zhif.png"
                   alt="">
            </span>
            <span class="text">国际支付宝支付</span>
          </div>
        </van-radio>
        <transition name="van-fade">
          <div class="global-pay"
               v-if="checkPayment == 'globalAlipay'">

            <van-radio-group @change="handleChangeGlobalPay"
                             v-model="globalAlipayType">
              <div v-for="item in currencyList"
                   class="global-pay-item"
                   :key="item.currency">
                <van-radio v-if="item.is_open == 1"
                           icon-size="14px"
                           :name="item.currency">{{ item.name }}</van-radio>
              </div>

            </van-radio-group>
          </div>
        </transition>

        <!-- 国际支付宝 end-->

        <!-- todo: 定制hantepay start-->
        <van-radio v-if="showHtPay && isPM"
                   label-position="left"
                   name="htwxpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>
        <van-radio v-if="showHtPay && isPM"
                   label-position="left"
                   name="htAlipay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/zhif.png"
                   alt="">
            </span>
            <span class="text">支付宝支付</span>
          </div>
        </van-radio>
        <!--hantepay end-->

        <!-- todo: 通联支付 start-->
        <van-radio v-if="showTlWxPay && isPM && isPointBuy"
                   label-position="left"
                   name="tlwxpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>
        <van-radio v-if="showTlAliPay && isPM && isPointBuy"
                   label-position="left"
                   name="tlAlipay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/zhif.png"
                   alt="">
            </span>
            <span class="text">支付宝支付</span>
          </div>
        </van-radio>
        <!--通联支付 end-->
        <!-- 通联分账支付 start-->
        <van-radio v-if="showTlfzWxPay && isTlfzPay"
                   label-position="left"
                   class="tlfz-wxpay"
                   name="tlfzWxpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>
        <!--通联分账支付 end-->
        <!-- 汇付分账支付 start-->
        <van-radio v-if="showHffzWxPay && isHffzPay"
                   label-position="left"
                   class="hffz-wxpay"
                   name="hffzWxpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>
        <!-- 定制 聚合支付 start -->
        <van-radio v-if="showJhWxPay && isJhPay"
                   label-position="left"
                   class="jhzf-wxpay"
                   name="jhWeChatPay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>
        <!-- 定制 聚合支付 end -->


        <!--定制：GoAllPay start-->
        <!-- <div v-if="showGoAllPay && isPM && !isPeerPay">
          <van-radio v-for="(item,index) in paymentSchema" :key="index"
            label-position="left"
            :name="item.channel_name" >
            <div class="payment-wrap-item-info">
              <span class="img">
                <img :src="item.img"
                    alt="">
              </span>
              <span class="text">{{item.Remark}}</span>
            </div>
          </van-radio>
        </div> -->
        <van-radio
          v-if="showGoAllPay && isPM && !isPeerPay"
          label-position="left"
          name="goallpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/goAllPay.png"
                   alt="">
            </span>
            <span class="text">GoAllPay</span>
          </div>
        </van-radio>


        <!--定制：GoAllPay end-->

        <!--汇聚支付 start-->
        <div v-if="showHuiJuPay && isPM && !isPeerPay">
          <van-radio v-for="(item,index) in paymentSchemaHuiJuPay" :key="index"
                     label-position="left"
                     :name="item.channel_name" >
            <div class="payment-wrap-item-info">
              <span class="img">
                <img :src="item.img"
                     alt="">
              </span>
              <span class="text">{{item.Remark}}</span>
            </div>
          </van-radio>
        </div>
        <!--汇聚支付 end-->

        <!-- 定制：上海百策 HipoPay start -->
        <van-radio v-if="showHipoWxPay && isPM"
                   label-position="left"
                   name="HipoWxPay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>
        <!-- 定制：上海百策 HipoPay end -->

        <!--微信支付-->
        <van-radio v-if="showWxpay"
                   label-position="left"
                   name="wxpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/weix.png"
                   alt="">
            </span>
            <span class="text">微信支付</span>
          </div>
        </van-radio>

        <!--支付宝支付-->
        <van-radio v-if="showAilipay"
                   label-position="left"
                   name="alipay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/zhif.png"
                   alt="">
            </span>
            <span class="text">支付宝支付</span>
          </div>
        </van-radio>

        <!--京东支付-->
        <van-radio v-if="showJdpay && isPM  && isKuajing"
                   label-position="left"
                   name="jdpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/jdico.png"
                   alt="">
            </span>
            <span class="text">京东支付</span>
          </div>
        </van-radio>

        <!--银联支付-->
        <van-radio v-if="showYlPay && isKuajing  && isKuajing"
                   label-position="left"
                   name="ylpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/ylpay.png"
                   alt="">
            </span>
            <span class="text">银联支付</span>
          </div>
        </van-radio>

        <!--PayPal-->
        <van-radio v-if="showPayPalPay && isPM && isPointBuy && !isPeerPay  && isKuajing"
                   label-position="left"
                   name="PayPalpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/paypaltm.png"
                   alt="">
            </span>
            <span class="text">PayPal</span>
          </div>
        </van-radio>

        <!-- 贝宝支付 -->
        <van-radio v-if="showBeiBaoPal && isPM && isPointBuy && !isPeerPay  && isKuajing"
                   label-position="left"
                   name="BeiBaopay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/paypalico.png"
                   alt="">
            </span>
            <span class="text">贝宝支付</span>
          </div>
        </van-radio>

        <!-- 找人代付 -->
        <van-radio v-if="showPeerPal && isPM && isPointBuy && is_wx ==1 && !isPeerPay  && isKuajing"
                   label-position="left"
                   name="peerpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/otherpay.png"
                   alt="">
            </span>
            <span class="text">找人代付</span>
          </div>
        </van-radio>

        <!-- 易宝支付 -->
        <van-radio v-if="showYeePal && isPM && isPointBuy && !isPeerPay && isKuajing"
                   label-position="left"
                   name="yeepay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/yee_pay.png"
                   alt="">
            </span>
            <span class="text">易宝支付</span>
          </div>
        </van-radio>

        <!-- 新易宝支付 -->
        <van-radio v-if="showNewYeePal && isPM && isPointBuy && !isPeerPay  && isKuajing"
                   label-position="left"
                   name="newyeepay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/yee_pay.png"
                   alt="">
            </span>
            <span class="text">新易宝支付</span>
          </div>
        </van-radio>

        <!-- 开联通支付 -->
        <van-radio v-if="showKltPal && isPM && isPointBuy && !isPeerPay  && isKuajing"
                   label-position="left"
                   name="kltpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/klt.png"
                   alt="">
            </span>
            <span class="text">开联通支付</span>
          </div>
        </van-radio>

        <!--快钱支付-->
        <van-radio v-if="showKqPay && isPM  && isKuajing"
                   label-position="left"
                   name="kqpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/kq_logo.png"
                   alt="">
            </span>
            <span class="text">快钱支付</span>
          </div>
        </van-radio>

        <!--货到付款-->
        <template v-if="ltnsStatus">
           <van-radio v-if="((isBuy && itemIsCod==1) || (!isBuy && showHdfkPay)) && isHdfkPay && isPM  && isKuajing"
                      label-position="left"
                      name="Hdfkpay">
              <div class="payment-wrap-item-info">
                <span class="img">
                  <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/cod.png"
                      alt="">
                </span>
                <span class="text">货到付款</span>
              </div>
            </van-radio>
        </template>
        <template v-else>
          <van-radio v-if="((isBuy && itemIsCod==1) || (!isBuy && showHdfkPay)) && isHdfkPay && isPM  && isKuajing"
                    label-position="left"
                    name="Hdfkpay">
            <div class="payment-wrap-item-info">
              <span class="img">
                <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/cod.png"
                    alt="">
              </span>
              <span class="text">货到付款</span>
            </div>
          </van-radio>
        </template>

        <!--线下支付-->
          <van-radio v-if="showXxPay && isXxPay && isPointBuy && isPM  && isKuajing"
                   label-position="left"
                   name="xxpay">
          <div class="payment-wrap-item-info">
            <span class="img">
              <img src="https://img.wifenxiao.com/h5-wfx/images/public/payment/xxzf1.png"
                   alt="">
            </span>
            <span class="text">线下支付</span>
          </div>
        </van-radio>

      </van-radio-group>

    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { payType } from '@/api/user/member/memberApi'
import { RadioGroup, Radio, Checkbox, Col } from 'vant'
import small from '@/smallapp/small'

Vue.use(RadioGroup)
Vue.use(Radio)
Vue.use(Checkbox)
export default Vue.extend({
  name: 'index',
  props: {
    value: {
      type: String
    },
    // 是否显示通联分账支付
    isTlfzPay: {
      type: Boolean,
      default: false
    },
    // 是否显示货到付款
    isHdfkPay: {
      type: Boolean,
      default: true
    },
    // 是否显示汇付分账支付
    isHffzPay: {
      type: Boolean,
      default: false
    },
    // 是否显示聚合支付
    isJhPay: {
      type: Boolean,
      default: false
    },
    // 是否显示线下支付
    isXxPay: {
      type: Boolean,
      default: true
    },
    // 拍卖页面只展示 微信 支付宝 银联
    isPM: {
      type: Boolean,
      default: true
    },
    // 跨境
    isKuajing: {
      type: Boolean,
      default: true
    },
    // 代付
    isPeerPay: {
      type: Boolean,
      default: false
    },
    // 是否显示余额付款
    isYuePay: {
      type: Boolean,
      default: false
    },
    // 积分结算
    isPointBuy: {
      type: Boolean,
      default: true
    },
    // 单个商品设置货到付款
    isBuy: {
      type: Boolean,
      default: false
    },
    itemIsCod: {
      type: [Number, String, Boolean],
      default: 0
    },
    // 商品ID
    itemIds: {
      type: Array,
    },
    // 莱特尼斯判断是否是充值
    isRecharge: {
      type: Boolean,
      default: false
    },
    istl: {
      type: Boolean,
      default: false
    },
    // 账户充值 开启通联分账 需要给后端一个标识
    isRechargeTl: {
      type: Boolean,
      default: false
    },
    tlInfobz: {
      type: Object,
      default: () => {
        return {
          is_tlfz: 0,
          is_tlfz_deposit: 0,
          is_ye: 0
        }
      }
    },
    dzSend: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      checkPayment: undefined,
      showWxpay: false,
      showAilipay: false,
      showJdpay: false,
      showYlPay: false,
      showPayPalPay: false,
      showBeiBaoPal: false,
      showPeerPal: false,
      showYeePal: false,
      showNewYeePal: false,
      showKltPal: false,
      showKqPay: false,
      showHdfkPay: false,
      showXxPay: false,
      showTlWxPay: false, // 通联微信支付
      showTlAliPay: false, // 通联支付宝
      showTlfzWxPay: false, // 通联分账微信支付
      showHffzWxPay: false, // 汇付分账微信支付
      showJhWxPay: false, // 聚合支付
      showHtPay: false, // hante wx/zfb
      showGlobalAlipay: false, // 国际支付宝
      globalAlipayType: '',
      currencyList: [], // 国际支付宝类型
      showCloudPay: false, // 云闪付
      showGoAllPay: false, // GoAllPay
      // paymentSchema: [], // GoAllPay
      is_wx: 0,
      isShowElsePay: true,
      partYue: {
        balance: '',
        checkPayment: '',

        auctionInfo: ''
      },
      ltnsStatus: false, // 莱特妮丝 定制
      is_offline: '',

      // 单个商品设置货到付款
      isBuy: {
        type: Boolean,
        default: false
      },
      itemIsCod: {
        type: [Number, String],
        default: 0
      },
      showHipoWxPay: false, // 上海百策定制 HipoPay 显示微信支付
      is_dhs_deposit: 0, // 是否是预存款充值
      showHuiJuPay: 0, // 汇聚支付
      paymentSchemaHuiJuPay: [] // 汇聚支付 数据
    }
  },
  watch: {
    value(val) {
      if (val == 'cancel') {
        this.checkPayment = undefined
      } else {
        this.checkPayment = val
      }
    },
    itemIds() {
      this.payTypeFn()
    },
    checkPayment(val) {
      this.$emit('input', val)
      if (val == 'globalAlipay') {
        this.$emit('globalAlipay', this.globalAlipayType)
      }
    },
    'istl'(val) {
      if (val) {
        this.payTypeFn()
      }
    },
  },
  created() {
    // 从万能表单过来不知道为什么this.$_shop报错，兼容一下
    if (!this.dzSend) {
      let shop = small.globalData.shopId
      const ltsn_dz = this.$_shop('$_ltsn_dz', shop)
      this.ltnsStatus = ltsn_dz
      // console.log('ltsn_dz', this.ltnsStatus)
    }

    this.payTypeFn()
    this.checkPayment = this.value
  },
  methods: {
    onSetBalance(val, auctionInfo) {
      this.partYue.balance = val
      this.partYue.auctionInfo = auctionInfo
    },
    onYueCbChange(val) {
      if (val && Number(this.partYue.balance) > Number(this.partYue.auctionInfo.deposit)) {
        this.$emit('input', '')
        this.checkPayment = undefined
        this.isShowElsePay = false
      } else if (!val) {
        this.isShowElsePay = true
      }
    },
    getYueDataWrap() {
      return this.partYue
    },
    /**
     * 国际支付宝货币类型
     */
    handleChangeGlobalPay() {
      this.$emit('globalAlipay', this.globalAlipayType)
    },
    /**
     * 获取支付默认展示数据
     */
    payTypeFn() {
      // console.log('this.isRecharge', this.isRecharge)
      // console.log('this.ltnsStatus', this.ltnsStatus)
      if(this.isRecharge && this.ltnsStatus){
        payType({ is_recharge: 1, item_id: this.itemIds, is_deposit: this.isRechargeTl, is_dhs_deposit: this.is_dhs_deposit }).then(res => {
          this.currencyList = res.data.currency
          this.globalAlipayType = res.data.default_currency_type // 默认选中的国际支付宝
          // console.log(res)
          this.showPaymentType(res.data)
          this.$emit('paymentData', res.data)
        })
      } else {
        // console.log('1212')
         payType({ item_id: this.itemIds, is_deposit: this.isRechargeTl, is_dhs_deposit: this.is_dhs_deposit }).then(res => {
          this.currencyList = res.data.currency
          this.globalAlipayType = res.data.default_currency_type // 默认选中的国际支付宝
          this.showPaymentType(res.data)
          this.$emit('paymentData', res.data)
        })
      }

    },
    /**
     * 页面加载时候的支付方式显示
     */
    showPaymentType(data) {
      const rechargeData = data
      this.showAilipay = rechargeData.is_alipay == 1
      this.showJdpay = rechargeData.is_bank == 1
      this.showYlPay = rechargeData.is_union_pay == 1
      this.showPayPalPay = rechargeData.is_paypal == 1
      this.showBeiBaoPal = rechargeData.is_beibao == 1
      this.showPeerPal = rechargeData.is_peer_pay == 1
      this.showYeePal = rechargeData.is_yee_pay == 1
      this.showNewYeePal = rechargeData.is_yee_pay_new == 1
      this.showKltPal = rechargeData.is_open_e_pay == 1
      this.showKqPay = rechargeData.is_bill_pay == 1
      this.showHdfkPay = rechargeData.is_cod == 1
      this.showXxPay = rechargeData.is_offline == 1
      if (this.$route.name == 'point-buy') {
        this.showXxPay = false
      }
      this.showHtPay = rechargeData.is_han_te_pay == 1
      this.showGlobalAlipay = rechargeData.is_global_alipay == 1
      this.showCloudPay = rechargeData.qadmw_cloud_pay == 1
      this.is_allinpay_pay = rechargeData.is_allinpay_pay // 通联支付
      this.showTlWxPay = rechargeData.allinpay_wx == 1 // 通联微信支付
      this.showTlAliPay = rechargeData.allinpay_ali == 1 // 通联支付宝
      this.showTlfzWxPay = rechargeData.is_tlfz_pay == 1 // 通联分账微信支付
      this.showHffzWxPay = rechargeData.adapay_wx == 1 // 汇付分账微信支付
      this.showGoAllPay = rechargeData.is_open_go_all_pay == 1 // 定制：GoAllPay
      this.showHipoWxPay = rechargeData.is_open_hipopay == 1 // 上海百策定制：HipoPay微信
      this.showHuiJuPay = rechargeData.is_open_huiju_pay || 0 // 定制 汇聚支付
      this.showJhWxPay = rechargeData.quick_mini_pay == 1 // 聚合支付
      this.is_wx = rechargeData.is_wx
      if (this.is_wx == 1) {
        this.showWxpay = rechargeData.is_wx_pay == 1
      } else {
        this.showWxpay = rechargeData.is_wx_pay_h5 == 1
      }
      //  莱特妮丝 start 判断是否显示线下支付
      if (this.ltnsStatus && rechargeData.is_offline == 1) {
        this.isXxPay = true
      }
      // 莱特妮丝 end
      // 定制汇聚支付
      if (rechargeData.is_open_huiju_pay && rechargeData.is_open_huiju_pay == 1 && rechargeData.huiju_pay_type && rechargeData.huiju_pay_type.length > 0) {
        this.paymentSchemaHuiJuPay = []
        this.paymentSchemaHuiJuPay.push(rechargeData.huiju_pay_type[0])
      }

      // 默认选中
      this.defaultCheckedFn(data)

    },
    /**
     * 默认选中
     */
    defaultCheckedFn(rechargeData) {
      if (rechargeData.default_quick_pay_type && this.isJhPay && this.showJhWxPay) {
        // 定制 聚合 微信支付
        this.checkPayment = 'jhWeChatPay'
        this.$emit('input', 'jhWeChatPay')
        return
      }
      if (rechargeData.default_pay_type == 1) {
        this.checkPayment = 'alipay'
      } else if (rechargeData.default_pay_type == 2) {
        this.checkPayment = 'wxpay'
      } else if (rechargeData.default_pay_type == 3) {
        this.checkPayment = 'jdpay'
      } else if (rechargeData.default_pay_type == 4) {
        this.checkPayment = 'ylpay'
      } else if (rechargeData.default_pay_type == 5) {
        this.checkPayment = 'kqpay'
      } else if (rechargeData.default_pay_type == 6) {
        this.checkPayment = 'xxpay'
      } else if (rechargeData.default_pay_type == 9) {
        // 货到付款 默认值被占用 先用 9 做为默认值
        this.checkPayment = 'Hdfkpay'
      } else if (rechargeData.default_pay_type == 17) {
        this.checkPayment = 'cloudPay'
      } else if (rechargeData.default_pay_type == 15) {
        this.checkPayment = 'globalAlipay'
      } else if (rechargeData.default_pay_type == 19) {
        if (rechargeData.allinpay_wx == 1) {
          this.checkPayment = 'tlwxpay'
          this.$emit('input', 'tlwxpay')
        } else if (rechargeData.allinpay_wx == 1) {
          this.checkPayment = 'tlAlipay'
          this.$emit('input', 'tlAlipay')
        }
      } else if (rechargeData.default_pay_type == 20) {
        this.checkPayment = 'goallpay'
        // this.checkPayment = this.paymentSchema[0].channel_name
      }else if (rechargeData.default_pay_type == 26) {
        if (this.tlInfobz.is_tlfz - 0 == 1 && this.tlInfobz.is_tlfz_deposit - 0 == 1 && this.tlInfobz.is_ye - 0 == 1) {
          this.checkPayment = undefined
          return false
        }
        // 通联分账微信支付
        this.checkPayment = 'tlfzWxpay'
        this.$emit('input', 'tlfzWxpay')
      } else if (rechargeData.default_pay_type == 27) {
        // 上海百策HipoPay微信支付
        this.checkPayment = 'HipoWxPay'
        this.$emit('input', 'HipoWxPay')
      } else if (rechargeData.default_pay_type == 24) {
        this.checkPayment = 'ytDzWxPay'
        this.$emit('input', 'ytDzWxPay')
      }else if (rechargeData.default_pay_type == 34) {
        // 汇付分账
        this.checkPayment = 'hffzWxpay'
        this.$emit('input', 'hffzWxpay')
      }
    }
  }
})
</script>

<style lang="scss">
@import "src/styles/mixin";
@import "src/styles/variables";
.miniprogram-root {
  .van-radio__icon .van-icon {
    width: 40px;
    height: 40px;
    font-size: 40px;
    line-height: initial;
  }
  .van-checkbox__icon {
    width: 40px;
    height: 40px;
    .van-icon {
      width: 40px;
      height: 40px;
      font-size: 40px;
      line-height: initial;
    }
  }
}
.payment-wrap {
  &-item {
    &-info {
      padding: 28px 0;
      .img {
        display: inline-block;
        width: 56px;
        height: 56px;
        vertical-align: middle;
        img {
          width: 100%;
        }
      }
      .text {
        color: #333;
        line-height: 50px;
        font-size: 28px;
        margin-left: 12px;
      }
    }
    .part-yue {
      .pay-yue {
        .balance_money {
          color: #F21228;
        }
      }
    }
    .pay-else-title {
      padding-bottom: 28px;
      font-size: 30px;
      color: #333;
      font-weight: 400;
    }
  }
}
</style>
<style lang="scss">
.payment-wrap {
  .van-radio__label.van-radio__label--left {
    width: 100%;
  }
  .van-radio {
    border-bottom: 2px solid #EDEDED;
    &:last-child {
      border: none;
    }
  }
  .van-radio.btm-divide {
    border-bottom: 0px solid #EDEDED;
    &:last-child {
      border: none;
    }
  }
  .global-pay-item {
    .van-radio {
      padding: 10px;
    }
  }
}
</style>
